package com.sky.mapper;

import com.sky.dto.UserLoginDTO;
import com.sky.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

/**
 * ClassName: UserMapper
 * Package: com.sky.mapper
 * Description:
 *
 * @Autehor 屈子岩
 * @Create 2024/9/12 14:36
 * @Version 1.0
 */
@Mapper
public interface UserMapper {

    @Select("select * from user where openid=#{openid}")
    @Options(useGeneratedKeys = true,keyProperty = "id",keyColumn = "id")
    User selectByOpenid(String openid);

    User insert(User user);
    @Select("select * from user where id=#{userId}")
    User getById(Long userId);
}
